﻿
namespace Indeco.G24.Windows.Forms
{
	/// <summary>
	/// This is the abstract edit form for the <see cref="Entities.VaiTro"/> entity.
	/// </summary>
	/// <remarks>This class is overwritten by .netTiers at each generation.</remarks>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class VaiTroEditControlBase : System.Windows.Forms.UserControl
	{
		#region Fields
		
		//private System.Windows.Forms.TableLayoutPanel uxTableLayoutPanel;
		/// <summary>
		/// The ErrorProvider for the Entity;
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxErrorProvider;
		
		/// <summary>
		/// The BindingSource for the entity.
		///</summary>
		protected System.Windows.Forms.BindingSource uxBindingSource;
						
		
		/// <summary>
		/// TextBox for the IDVaiTro property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxIDVaiTro;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the IDVaiTro property.
		/// </summary>
		protected System.Windows.Forms.Label uxIDVaiTroLabel;
		
		/// <summary>
		/// TextBox for the TenVaiTro property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxTenVaiTro;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the TenVaiTro property.
		/// </summary>
		protected System.Windows.Forms.Label uxTenVaiTroLabel;
		
		/// <summary>
		/// TextBox for the MoTa property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxMoTa;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the MoTa property.
		/// </summary>
		protected System.Windows.Forms.Label uxMoTaLabel;
		
		/// <summary>
		/// CheckBox for the Xem property.
		/// </summary>
		protected System.Windows.Forms.CheckBox uxXem;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the Xem property.
		/// </summary>
		protected System.Windows.Forms.Label uxXemLabel;
		
		/// <summary>
		/// CheckBox for the Sua property.
		/// </summary>
		protected System.Windows.Forms.CheckBox uxSua;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the Sua property.
		/// </summary>
		protected System.Windows.Forms.Label uxSuaLabel;
		
		/// <summary>
		/// CheckBox for the Xoa property.
		/// </summary>
		protected System.Windows.Forms.CheckBox uxXoa;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the Xoa property.
		/// </summary>
		protected System.Windows.Forms.Label uxXoaLabel;
		
		/// <summary>
		/// CheckBox for the Taomoi property.
		/// </summary>
		protected System.Windows.Forms.CheckBox uxTaomoi;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the Taomoi property.
		/// </summary>
		protected System.Windows.Forms.Label uxTaomoiLabel;
		#endregion
		
		#region Main entity
		private Entities.VaiTro _VaiTro;
		/// <summary>
		/// Gets or sets the <see cref="Entities.VaiTro"/> entity to edit with this form.
		/// </summary>
		/// <value>The <see cref="Entities.VaiTro"/> instance.</value>
		public Entities.VaiTro VaiTro
		{
			get {return this._VaiTro;}
			set
			{
				this._VaiTro = value;
				if (value != null) 
				{
					this.uxBindingSource.DataSource = value;
					BindControls();
				}			
				
			}
		}
		#endregion
		
		/// <summary>
		/// Binds the controls.
		/// </summary>
		private void BindControls()
		{
			this.uxIDVaiTro.DataBindings.Clear();
			this.uxIDVaiTro.DataBindings.Add("Text", this.uxBindingSource, "IDVaiTro", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxTenVaiTro.DataBindings.Clear();
			this.uxTenVaiTro.DataBindings.Add("Text", this.uxBindingSource, "TenVaiTro", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxMoTa.DataBindings.Clear();
			this.uxMoTa.DataBindings.Add("Text", this.uxBindingSource, "MoTa", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxXem.DataBindings.Clear();
			this.uxXem.DataBindings.Add("Checked", this.uxBindingSource, "Xem", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxSua.DataBindings.Clear();
			this.uxSua.DataBindings.Add("Checked", this.uxBindingSource, "Sua", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxXoa.DataBindings.Clear();
			this.uxXoa.DataBindings.Add("Checked", this.uxBindingSource, "Xoa", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxTaomoi.DataBindings.Clear();
			this.uxTaomoi.DataBindings.Add("Checked", this.uxBindingSource, "Taomoi", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
		}					
		
		#region Constructor
		
		/// <summary>
		/// Initializes a new instance of the <see cref="VaiTroEditControlBase"/> class.
		/// </summary>
		public VaiTroEditControlBase()
		{
			InitializeComponent();			
			
			this.uxBindingSource.CurrentItemChanged += new System.EventHandler(uxBindingSource_currentItemChanged);
		}		
		
		/// <summary>
		/// 
		/// </summary>
		private void uxBindingSource_currentItemChanged(object sender, System.EventArgs e)
		{
			if (_VaiTro != null) _VaiTro.Validate();
		}	
				
		/// <summary>
		/// Initializes the component.
		/// </summary>
		public void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			this.uxErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxBindingSource = new System.Windows.Forms.BindingSource(this.components);
			
			//this.uxTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
			this.uxIDVaiTro = new System.Windows.Forms.TextBox();
			uxIDVaiTroLabel = new System.Windows.Forms.Label();
			this.uxTenVaiTro = new System.Windows.Forms.TextBox();
			uxTenVaiTroLabel = new System.Windows.Forms.Label();
			this.uxMoTa = new System.Windows.Forms.TextBox();
			uxMoTaLabel = new System.Windows.Forms.Label();
			this.uxXem = new System.Windows.Forms.CheckBox();
			uxXemLabel = new System.Windows.Forms.Label();
			this.uxSua = new System.Windows.Forms.CheckBox();
			uxSuaLabel = new System.Windows.Forms.Label();
			this.uxXoa = new System.Windows.Forms.CheckBox();
			uxXoaLabel = new System.Windows.Forms.Label();
			this.uxTaomoi = new System.Windows.Forms.CheckBox();
			uxTaomoiLabel = new System.Windows.Forms.Label();
			
			((System.ComponentModel.ISupportInitialize)(this.uxBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxErrorProvider)).BeginInit();
			this.SuspendLayout();
			
			// 
			// uxTableLayoutPanel
			// 
			//this.uxTableLayoutPanel.AutoSize = true;
			//this.uxTableLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			//this.uxTableLayoutPanel.ColumnCount = 2;
			//this.uxTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
			//this.uxTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 250F));
			//this.uxTableLayoutPanel.Location = new System.Drawing.System.Drawing.Point(3, 3);
			//this.uxTableLayoutPanel.Name = "uxTableLayoutPanel";
			//this.uxTableLayoutPanel.RowCount = 2;
			//this.uxTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
			//this.uxTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
			//this.uxTableLayoutPanel.Size = new System.Drawing.Size(450, 50);
			//this.uxTableLayoutPanel.TabIndex = 0;
			
			//
			// uxErrorProvider
			//
			this.uxErrorProvider.ContainerControl = this;
			this.uxErrorProvider.DataSource = this.uxBindingSource;
			
			//
			// uxIDVaiTroLabel
			//
			this.uxIDVaiTroLabel.Text = "IDVaiTro:";
			this.uxIDVaiTroLabel.Location = new System.Drawing.Point(3, 0);
			this.Controls.Add(this.uxIDVaiTroLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxIDVaiTroLabel);			
			//
			// uxIDVaiTro
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxIDVaiTro);
			this.uxIDVaiTro.Location = new System.Drawing.Point(160, 0);
			this.Controls.Add(this.uxIDVaiTro);
			//
			// uxTenVaiTroLabel
			//
			this.uxTenVaiTroLabel.Text = "TenVaiTro:";
			this.uxTenVaiTroLabel.Location = new System.Drawing.Point(3, 26);
			this.Controls.Add(this.uxTenVaiTroLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxTenVaiTroLabel);			
			//
			// uxTenVaiTro
			//
			this.uxTenVaiTro.Width = 250;
			this.uxTenVaiTro.MaxLength = 50;
			//this.uxTableLayoutPanel.Controls.Add(this.uxTenVaiTro);
			this.uxTenVaiTro.Location = new System.Drawing.Point(160, 26);
			this.Controls.Add(this.uxTenVaiTro);
			//
			// uxMoTaLabel
			//
			this.uxMoTaLabel.Text = "MoTa:";
			this.uxMoTaLabel.Location = new System.Drawing.Point(3, 52);
			this.Controls.Add(this.uxMoTaLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxMoTaLabel);			
			//
			// uxMoTa
			//
			this.uxMoTa.Width = 250;
			this.uxMoTa.MaxLength = 1024;
			//this.uxTableLayoutPanel.Controls.Add(this.uxMoTa);
			this.uxMoTa.Location = new System.Drawing.Point(160, 52);
			this.Controls.Add(this.uxMoTa);
			//
			// uxXemLabel
			//
			this.uxXemLabel.Text = "Xem:";
			this.uxXemLabel.Location = new System.Drawing.Point(3, 78);
			this.Controls.Add(this.uxXemLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxXemLabel);			
			//
			// uxXem
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxXem);
			this.uxXem.Location = new System.Drawing.Point(160, 78);
			this.Controls.Add(this.uxXem);
			//
			// uxSuaLabel
			//
			this.uxSuaLabel.Text = "Sua:";
			this.uxSuaLabel.Location = new System.Drawing.Point(3, 104);
			this.Controls.Add(this.uxSuaLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxSuaLabel);			
			//
			// uxSua
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxSua);
			this.uxSua.Location = new System.Drawing.Point(160, 104);
			this.Controls.Add(this.uxSua);
			//
			// uxXoaLabel
			//
			this.uxXoaLabel.Text = "Xoa:";
			this.uxXoaLabel.Location = new System.Drawing.Point(3, 130);
			this.Controls.Add(this.uxXoaLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxXoaLabel);			
			//
			// uxXoa
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxXoa);
			this.uxXoa.Location = new System.Drawing.Point(160, 130);
			this.Controls.Add(this.uxXoa);
			//
			// uxTaomoiLabel
			//
			this.uxTaomoiLabel.Text = "Taomoi:";
			this.uxTaomoiLabel.Location = new System.Drawing.Point(3, 156);
			this.Controls.Add(this.uxTaomoiLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxTaomoiLabel);			
			//
			// uxTaomoi
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxTaomoi);
			this.uxTaomoi.Location = new System.Drawing.Point(160, 156);
			this.Controls.Add(this.uxTaomoi);
			// 
			// VaiTroEditControlBase
			// 
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			//this.Controls.Add(this.uxTableLayoutPanel);
			this.AutoScroll = true;
			this.Name = "VaiTroEditControlBase";
			this.Size = new System.Drawing.Size(478, 311);
			//this.Localizable = true;
			((System.ComponentModel.ISupportInitialize)(this.uxErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBindingSource)).EndInit();			
			this.ResumeLayout(false);
			this.PerformLayout();
		}
		#endregion
				
		#region ComboBox List
		
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;

		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	}
}
